<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body onload="StartPreview()">
<script>
    function StartPreview(){
        var SSOcx = document.getElementById("playOcx");//获取object元素js对象
        alert("1");
        SSOcx.LoginDeviceEx("192.168.1.108", "37777", "admin", "lb123456", 0);
        //登录视频,{IP},{port},{username},{password}为动态参数，前4位参数，可从接口中获取
        SSOcx.StartRealPlay(0, 0);//开启实时视频监控
    };
</script>
<div>
    <!-- CLSID及为注册表中WebActiveX的CLSID -->
    <object classid="CLSID:D6F4DBE8-4A91-4e7b-AE9A-9C6C2008EAA0" id="playOcx" align="center"
            width="100%" height="800px"></object>
</div>
</body>
</html>